<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<jsp:include page="${APP_PATH }/userController/toHeadIndex"></jsp:include>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>火车票首页</title>
<%
	pageContext.setAttribute("APP_PATH", request.getContextPath());
%>
<!-- web路径：
不以/开始的相对路径，找资源，以当前资源的路径为基准，经常容易出问题。
以/开始的相对路径，找资源，以服务器的路径为标准(http://localhost:3306)；需要加上项目名
		http://localhost:3306/crud
 -->
<script type="text/javascript"
	src="${APP_PATH }/static/js/jquery.min.js"></script>
<link
	href="${APP_PATH }/static/bootstrap-3.3.7-dist/css/bootstrap.min.css"
	rel="stylesheet">
<style type="text/css">
.train_form_input{
    width: 350;
    height: 34px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}
</style>
<script
	src="${APP_PATH }/static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script src="${APP_PATH }/static/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
	$(function() {
		$("#hotel_href").removeClass('active');
		$("#plane_href").removeClass('active');
		$("#train_href").addClass('active');
		
		//搜索航班信息
		$("#findTrain").click(function(){
			var startCity = $("#startCity").val();
			var startTime = $("#startTime").val();
			var endCity = $("#endCity").val();
			window.location.href= "${APP_PATH}/trainController/toTrainList?startCityName="+startCity+"&startDate="+startTime+"&endCityName="+endCity;
		});
	});
</script>
</head>
<body>
	<div class="container">
		
		<!-- 显示火车票 -->
		<div style="background-image: url('${APP_PATH }/static/images/train/train_index.jpg');"
			id="train_info">
			<br /> <br /> <br /> <br /> <br /> <br />
			<div class="row">
				<div class="col-md-6 col-md-offset-3">
					<label>出发日期</label>&nbsp;&nbsp;&nbsp;&nbsp;<input id="startTime"
						value="" class="Wdate"
						onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'%y-%M-%d',readOnly:true})"
						style="width: 130px; height: 32px; border-radius: 4px;" />&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;<label id="returnDateLabel" style="display: none;">
				</div>
			</div>
			<br />
			<div class="row">
				<div class="col-md-6 col-md-offset-3">
					<label>出发城市</label>&nbsp;&nbsp;&nbsp;&nbsp;<input id="startCity" value=""
						class="train_form_input" style="width: 130px; height: 32px;" />&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;<label>到达城市</label>&nbsp;&nbsp;&nbsp;<input id="endCity" value=""
						class="train_form_input" style="width: 130px; height: 32px;" />
				</div>
			</div>
			<br />
			<div class="row">
				<div class="col-md-1 col-md-offset-7">
					<button id="findTrain" type="button" class="btn btn-info">搜索</button>
				</div>
			</div>
			<br /> <br /> <br /> <br /> <br /> <br /> <br />
		</div>
				
	</div>


</body>
</html>